package cn.anosi.entity.test2;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.anosi.entity.BaseEntity;

/**
 * Stu
 * 描述: 学生
 * 创建人: 刘彦硕
 * 创建时间: 2017-07-07 14:59:25
 */
@Entity
@Table(name="stu")
public class Stu extends BaseEntity{

	private static final long serialVersionUID = 1L;

	//姓名
	private String name;
	//学号
	private String no;

	private Classroom classroom;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	@JoinColumn(name="c_id")
	@ManyToOne
	public Classroom getClassroom() {
		return classroom;
	}

	public void setClassroom(Classroom classroom) {
		this.classroom = classroom;
	}
}
